package com.github.fancyideas.module.view;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.annotations.Immutable;
import org.hibernate.annotations.Subselect;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;

@Data
@Entity
@Immutable
@Subselect("select * from v_shoes_his")
public class ShoesHisView {

    @Id
    private Long shoesHisId;
    private Long customerId;
    private String operations;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date putInDate;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date takeOutDate;
    private BigDecimal cost;
    private String putInAddress;
    private String customerName;
}
